package com.hczt.springcloud.servicefeign.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 把今天最好的表现当作明天最新的起点．．～
 * いま 最高の表現 として 明日最新の始発．．～
 * Today the best performance  as tomorrow newest starter!
 *
 * @author marvin.ma
 * @create 2017-10-22 7:08
 * @desc feign接口
 *
 * 通过@ FeignClient注解通告服务名，来指定调用哪个服务
 **/
@FeignClient(value = "EUREKA-CLIENT1", fallback = SchedualServiceHiHystric.class)
public interface SchedualServiceHi {

    /**
     * 调用了eureka-client服务的“/hi”接口
     * @param name
     * @return
     */
    @GetMapping(value = "/hi")
    String sayHiFromClientOne(@RequestParam(value = "name") String name);

}
